Skip to content

Add a note about flush: 'sync', with links from elsewhere #1895

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 15, 2022

Conversation

skirtles-code
Copy link
Contributor

#1798 proposed adding information about flush: 'sync' to the main guide.

In my opinion, flush: 'sync' is an escape hatch that should be rarely used and is not something we want to encourage. Such features are typically only mentioned in the API reference, rather than the guide. I think mentioning it in an advanced guide would be fine (e.g. a detailed guide to the scheduler queue), but currently there isn't a suitable advanced guide where this topic can be covered.

The existence of flush: 'sync' is already mentioned in the API reference, but as far as I'm aware there isn't currently any explanation about what it does.

In this PR I've added a paragraph to watchEffect(), giving a brief explanation of flush: 'sync'. I have intentionally not given a lot of information or an example, for the same reason I don't think it should be in the guide.

I've also included links to watchEffect() in the entries for watch, $watch() and watch(), under the flush option. The alternative was to duplicate the explanation 4 times, which I didn't want to do.

@netlify
Copy link

netlify bot commented Aug 8, 2022

Deploy Preview for vuejs ready!

Name Link
🔨 Latest commit 6a5fc04
🔍 Latest deploy log https://app.netlify.com/sites/vuejs/deploys/62f0de448adeb90008994361
😎 Deploy Preview https://deploy-preview-1895--vuejs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@yyx990803 yyx990803 merged commit 93d4aa6 into vuejs:main Aug 15, 2022
edimitchel referenced this pull request in vuejs-translations/docs-fr Aug 22, 2022
)

Co-authored-by: skirtle <65301168+skirtles-code@users.noreply.github.com>
edimitchel referenced this pull request in vuejs-translations/docs-fr Aug 22, 2022
* Add a note about `flush: 'sync'`, with links from elsewhere (#1895)

* Update the note about Vue Router and lazy loading (#1896)

Co-authored-by: skirtle <65301168+skirtles-code@users.noreply.github.com>
edimitchel referenced this pull request in vuejs-translations/docs-fr Aug 22, 2022
* Add a note about `flush: 'sync'`, with links from elsewhere (#1895)

* Update the note about Vue Router and lazy loading (#1896)

* Fix Testing Library example (#1904)

Co-authored-by: skirtle <65301168+skirtles-code@users.noreply.github.com>
Co-authored-by: Noel De Martin <noel@noeldemartin.com>
edimitchel referenced this pull request in vuejs-translations/docs-fr Aug 22, 2022
* Add a note about `flush: 'sync'`, with links from elsewhere (#1895)

* Update the note about Vue Router and lazy loading (#1896)

* Fix Testing Library example (#1904)

* 📝 Composition api is available in Vue 2.7 (#1909)

Co-authored-by: skirtle <65301168+skirtles-code@users.noreply.github.com>
Co-authored-by: Noel De Martin <noel@noeldemartin.com>
Co-authored-by: Viki Val <viktorko99@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants